package it.unipd.fbaron.mind_reader_squared.model;

import it.unipd.fbaron.mind_reader_squared.R;

public class SymbolDAO {

	int id = -1;
	String name = "";
	String text = "";
	int imageResource = R.drawable.m1_image_not_found;
	String imagePath = "";
	int parent = 0;
	boolean m1 = false;
	int m1Pos = -1;
	boolean m2 = false;
	int m2Pos = -1;
	String soundPath = "";
	int profileId = 0;
	int clicksM1 = 0;
	int soundChoise = 0;
	int clicksM2 = 0;

	public SymbolDAO(int id, String name, int img_res, String text,
			String img_path, int parent, boolean m1, int m1_pos, boolean m2,
			int m2_pos, String sound_path, int profile_id, int soundChoise) {
		this.id = id;
		this.name = name;
		this.imageResource = img_res;
		this.text = text;
		this.imagePath = img_path;
		this.m1 = m1;
		this.m2 = m2;
		this.parent = parent;
		this.m1Pos = m1_pos;
		this.m2Pos = m2_pos;
		this.soundPath = sound_path;
		this.profileId = profile_id;
		this.soundChoise = soundChoise;
	}

	public SymbolDAO() {
	}

	public SymbolDAO(SymbolDAO symbol) {
		this.id = symbol.getId();
		this.name = symbol.getName();
		this.imageResource = symbol.getImageResource();
		this.text = symbol.getText();
		this.imagePath = symbol.getImagePath();
		this.m1 = symbol.isM1();
		this.m2 = symbol.isM2();
		this.parent = symbol.getParent();
		this.m1Pos = symbol.getM1Pos();
		this.m2Pos = symbol.getM2Pos();
		this.soundPath = symbol.getSoundPath();
		this.profileId = symbol.getProfileId();
		this.clicksM1 = symbol.getClicksM1();
		this.soundChoise = symbol.getSoundChoise();
		this.clicksM2 = symbol.getClicksM2();
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getText() {
		return DataBaseHelper.cleanStringForLoad(text);
	}

	public void setText(String text) {
		this.text = text;
	}

	public int getImageResource() {
		return imageResource;
	}

	public void setImageResource(int imageResource) {
		this.imageResource = imageResource;
	}

	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	public int getParent() {
		return parent;
	}

	public void setParent(int parent) {
		this.parent = parent;
	}

	public boolean isM1() {
		return m1;
	}

	public void setM1(boolean m1) {
		this.m1 = m1;
	}

	public int getM1Pos() {
		return m1Pos;
	}

	public void setM1Pos(int m1Pos) {
		this.m1Pos = m1Pos;
	}

	public boolean isM2() {
		return m2;
	}

	public void setM2(boolean m2) {
		this.m2 = m2;
	}

	public int getM2Pos() {
		return m2Pos;
	}

	public void setM2Pos(int m2Pos) {
		this.m2Pos = m2Pos;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getSoundPath() {
		return soundPath;
	}

	public void setSoundPath(String sound_path) {
		this.soundPath = sound_path;
	}

	public int getProfileId() {
		return profileId;
	}

	public void setProfileId(int profileId) {
		this.profileId = profileId;
	}

	public int getClicksM1() {
		return clicksM1;
	}

	public void setClicksM1(int clicks) {
		this.clicksM1 = clicks;
	}

	public int getClicksM2() {
		return clicksM2;
	}

	public void setClicksM2(int clicks) {
		this.clicksM2 = clicks;
	}

	public int getSoundChoise() {
		return soundChoise;
	}

	public void setSoundChoise(int soundChoise) {
		this.soundChoise = soundChoise;
	}

	@Override
	public String toString() {
		return getText();
	}
}
